% Learning Matlab
load starttime.mat
secPerMin = 60;
secPerHour = secPerMin*60;
secPerDay = secPerHour *24;
secPerMonth = secPerDay *30.5;
secPerYear = secPerMonth *12;
endOfClass = 5*secPerDay;
secondConversion = [secPerYear,secPerMonth,secPerDay,secPerHour,secPerMin,1];
currentTime = clock();
elapsedTime = currentTime - start;
t = secondConversion*elapsedTime';
tau = 1.5*secPerDay;
k = (1 - exp(-(t)/tau))*100;
%disp(['At this time, I know ',num2str(k),'% of MATLAB']);
tVec = linspace(0,endOfClass,10000);
knowledgeVec = 1 - exp(-tVec/tau);
[minVal,minInd] = min(abs(knowledgeVec - 0.5));
halfTime = tVec(minInd);
disp(['I will know half of MATLAB after ',num2str(halfTime/secPerDay),' days']);
tVec = tVec/secPerDay;
figure;
figure;
plot(tVec,knowledgeVec);
